package com.mls.fivedistrict.pojo;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 快讯分享报表
 * </p>
 *
 * @author Five Team
 * @since 2018-06-12
 */
@Data
@Accessors(chain = true)
@TableName(value = "t_news_flash_share_report", resultMap = "BaseResultMap")
public class NewsFlashShareReport extends Model<NewsFlashShareReport> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private Long userId;
    /**
     * 分享类型枚举：微信好友、微信朋友圈
     */
    private String shareType;
    /**
     * 快讯Id
     */
    @NotNull(message = "快讯id不能为空")
    private Long newsFlashId;
    private Date createDate;
    private Date updateTime;
    @TableLogic
    private Boolean isDelete;

    private transient NewsFlash newsFlash;
    private transient User user;

    public Boolean getDelete() {
        return isDelete;
    }

    public void setDelete(Boolean delete) {
        isDelete = delete;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
